#include "binary_tree.hpp"
//#include "trending_binary_tree.h"
//#include "word.h"
using namespace ece::tree;

#include <iostream>
//#include <string>

int main(void)
{
   binary_tree<int> tree;
   tree.insert(5);
   tree.insert(7);
   tree.insert(3);
   tree.insert(4);
   tree.insert(2);
   tree.insert(6);
   tree.insert(6);
   tree.insert(6);
   tree.insert(5);

   binary_tree<int>::tree_data* arr = new 
      binary_tree<int>::tree_data[tree.size()];
   tree.to_array (arr);

   int i;
   for (i = 0; i < 6; i++)
      std::cout << arr[i].data << "(" << arr[i].frequency << ")" 
         << std::endl;

   //binary_tree<int> tree;
   //tree.insert(5);
   //tree.insert(7);

   //binary_tree<int>::tree_data* arr = new 
   //   binary_tree<int>::tree_data[tree.size()];
   //tree.to_array (arr);

   //int i;
   //for (i = 0; i < 2; i++)
   //   std::cout << arr[i].data << "(" << arr[i].frequency << ")" 
   //      << std::endl;

   //word word1(std::string("barn"));
   //word word2(std::string("abacus"));
   //word word3(std::string("casino"));

   //trending_binary_tree tree2;
   //tree2.insert(word1);
   //tree2.insert(word2);
   //tree2.insert(word3);

   return 0;
}
